package com.zhenhao.xsq.ui.activity.notice.module;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.notice.NoticeActivity;
import com.zhenhao.xsq.ui.activity.notice.contract.NoticeContract;
import com.zhenhao.xsq.ui.activity.notice.presenter.NoticePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author xlei
 * @Package com.yxld.gb.xsq.ui.activity.notice
 * @Description: The moduele of NoticeActivity, provide field for NoticeActivity
 * @date 2019/03/16 10:11:46
 */
@Module
public class NoticeModule {
    private final NoticeContract.View mView;


    public NoticeModule(NoticeContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public NoticePresenter provideNoticePresenter(HttpAPIWrapper httpAPIWrapper, NoticeActivity mActivity) {
        return new NoticePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public NoticeActivity provideNoticeActivity() {
        return (NoticeActivity) mView;
    }
}